﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Script.Serialization;

namespace EnglishRemix.Services.Model
{
    public class Response
    {
        public string result;

        public string message;

        public dynamic data;

        public Response()
        {
            result = "";
            message = "";
        }

        public Response(string pResult, string pMsg, dynamic pData)
        {
            result = pResult;
            message = pMsg;
            data = pData;
        }

        public string toJson(){
            if(data==null){
                data = "";
            }
            return new JavaScriptSerializer().Serialize(this);           
        }
    }
}